package de.mhus.lib.mandala.bind;

import java.util.LinkedList;

import org.codehaus.jackson.JsonNode;

import de.mhus.lib.mandala.Function;

public abstract class DataSourceAction extends Function {

//	private static final long MAX_DIRECT = 1000;
	private DataProvider provider;
	
	protected Iterable<DataRow> getData(JsonNode in) {
		LinkedList<DataRow> out = new LinkedList<DataRow>();
		if (provider == null) return out;
		provider.fillWithData(null,out);
		return out;
	}

	public DataProvider getProvider() {
		return provider;
	}

	public void setProvider(DataProvider provider) {
		this.provider = provider;
	}
}
